home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / fpc / source / docs / stringex / ex11.pp < prev    next >
Encoding:
Text File  |  2000-01-01  |  314 b   |  17 lines

  1. Program Example11;
  2.  
  3. Uses strings;
  4.  
  5. { Program to demonstrate the StrCat function. }
  6.  
  7. Const P1 : PChar = 'This is a PChar String.';
  8.  
  9. Var P2 : PChar;
  10.  
  11. begin
  12.   P2:=StrAlloc (StrLen(P1)*2+1);
  13.   StrMove (P2,P1,StrLen(P1)+1); { P2=P1 }
  14.   StrCat (P2,P1);               { Append P2 once more }
  15.   Writeln ('P2 : ',P2);
  16. end.
  17.